package com.gxa.customer.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gxa.common.pojo.SysUser;
import com.gxa.customer.mapper.UserMapper;
import com.gxa.customer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public SysUser selectByUsername(String username) {
        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
        //链式调用
        queryWrapper.eq("username",username);
        SysUser sysUser = userMapper.selectOne(queryWrapper);
        return sysUser;
    }
}
